﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using TalksLog.Domain.Account.Entities;
using TalksLog.Infrastructure.EFRepository.EntityTypeConfigurations;
using TalksLog.Infrastructure.EFRepository.IdentityGenerater;

namespace TalksLog.Infrastructure.EFRepository
{
    public class EFDbContext:DbContext
    {
        public EFDbContext():base("name=TalksLog")
        {
           
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);

            modelBuilder.Configurations.Add(new EntityIdentityTypeConfiguration());
            modelBuilder.Configurations.Add(new AccountTypeConfiguration());
        }

        public DbSet<EntityIdentity> EntityIdentites { get; set; }
        public DbSet<Account> Accounts { get; set; }
        public DbSet<EmailVerification> EmailVerifications { get; set; }
    }
}
